/******************************************************************************
	This file is a part of the Snapshot Bioinformatics Project

	Copyright (C) 2012-2013 Jarom Schow

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef TAXON_H
#define TAXON_H

#include "BioDefs.h"

#include <QtCore/QString>
#include <QtCore/QList>

namespace Bio {

class Taxon;
class BioDB;

typedef QList<Taxon*>	TaxonList;

class BIO_EXPORT Taxon {
public:
	Taxon();
	Taxon( BioDB *db );
	~Taxon();

	enum NodeRank {
		NoRank,
		SuperKingdom,
		Kingdom,
		Phylum,
		Class,
		Order,
		Family,
		Genus,
		Species,
		Subspecies
	};

	void	setName( const QString &name );
	QString	getName() const;

	void	setTaxonId( int id );
	int		getTaxonId() const;

	void	setNcbiId( int id );
	int		getNcbiId() const;

	void	setParentId( int id );
	int		getParentId() const;

	void		setNodeRank( NodeRank rank );
	NodeRank	getNodeRank() const;

	void	setGeneticCode( int code );
	int		getGeneticCode() const;

	void	setMitoGeneticCode( int code );
	int		getMitoGeneticCode() const;

	void	setLeftValue( int left );
	int		getLeftValue() const;

	void	setRightValue( int right );
	int		getRightValue() const;

	Taxon*	getParent();
	TaxonList	getChildren();
	
private:

	struct	Data;
	Data	*m_data;
};

}; // Bio

#endif // TAXON_H